#define _CRT_SECURE_NO_WARNINGS 
#include<stdio.h>
#include"O_L.h"
void CSH(OB* p)
{
	p->a=(name*)malloc(sizeof(name));
	p->count = 0;
	p->size = 1;
}
void print(OB* p)
{
	for (int i = 0; i < p->count; i++)
	{
		printf("%d ", p->a[i]);
	}
}
void endadd(OB* p,name x)
{
	if (p->count == p->size);
	{
		p->a = (name*)realloc(p->a,p->size*2*sizeof(name));
		p->size *= 2;
	}
	p->a[p->count] = x;
	p->count++;
}
void headdelete(OB* p)
{
	for (int i = 1; i < p->count; i++)
	{
		p->a[i - 1] = p->a[i];
	}
	p->count--;
}
void enddelete(OB* p)
{
	p->count--;
}
void headadd(OB* p, name x)
{
	if (p->count == p->size);
	{
		p->a = (name*)realloc(p->a, p->size * 2 * sizeof(name));
		p->size *= 2;
	}
	for (int i = p->count; i >= 1; i--)
	{
		p->a[i] = p->a[i - 1];
	}
	p->a[0] = x;
	p->count++;
}